﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenCompiler.Scanning.Scanners;

namespace OpenCompiler.Scanning.Tests.Specs_for_scanner
{
	[TestClass]
	public class When_scanning_for_arithmetic
	{
		[TestMethod]
		public void Literals_tokenizes_operands()
		{
			TokenTestHelper.TestForTokenBasedOnValuesInEnum<Operand, ArithmeticScanner>("5{0}1",3,1);
		}

		[TestMethod]
		public void Variables_tokenizes_operands()
		{
			TokenTestHelper.TestForTokenBasedOnValuesInEnum<Operand, ArithmeticScanner>("value1{0}value2", 3, 1);
		}

		[TestMethod]
		public void Variable_and_literal_tokenizes_operands()
		{
			TokenTestHelper.TestForTokenBasedOnValuesInEnum<Operand, ArithmeticScanner>("value1{0}5", 3, 1);
			TokenTestHelper.TestForTokenBasedOnValuesInEnum<Operand, ArithmeticScanner>("5{0}value1", 3, 1);
		}
	}
}